<?php
/**
 * Created by PhpStorm.
 * User: ljc
 * Date: 2018/8/18
 * Time: 17:18
 */

namespace App\apitransifer;


use League\Fractal\TransformerAbstract;
use Modules\Shop\Entities\Category;

class CategoryTransformer extends TransformerAbstract
{
	public function transform(Category $category){
		return [
			'id'=>$category['id'],
			'cname'=>$category['cname'],
		];
	}
}